package com.woniuxy.dao;


import com.woniuxy.entity.RbacManagerDTO;
import com.woniuxy.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ManagerDao {

    int findCountByNameOrId(User user);

    List<User> selectAll();

    int addUser(User user);

    int updateUser(User user);

    int deleteUserById(int id);

    List<User> findUserByName(String username);

    List<User> search(@Param("account") String account,@Param("roleName") String roleName);

    User findOneByName(String username);

    int editType(int id);

    User findOneById(int id);

    int updateInitPwd(@Param("id") int id,@Param("newPassword") String newPassword);

    int updateRole(RbacManagerDTO rbacManagerDTO);
}
